-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimizations for the navfn planner in large map scenarios #4244
base: humble
Are you sure you want to change the base?
Conversation
@XinyuKhan, all pull requests must be targeted towards the |
auto new_ns = nx * ny; | ||
|
||
if (new_ns == ns) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not still set the costarr and pending to 0
?
There are a few changes:
Can you highlight the runtime impact of each of these changes? Also you mention that this speeds up the planner in general, please provide metrics for before and after on your benchmark to understand the improvements made This PR also needs to be rebased to |
That's a good advice, but I need some time to do some tests. |
Here is the test results: origin:heatmap:log:[component_container_isolated-6] [WARN] [1712502780.775772104] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 6.8489 Hz
[component_container_isolated-6] [INFO] [1712502780.830958993] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502781.949104795] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 6.6624 Hz
[component_container_isolated-6] [INFO] [1712502781.980901983] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502783.140534794] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 6.1982 Hz
[component_container_isolated-6] [INFO] [1712502783.180881660] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502784.397907490] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 4.3780 Hz
[component_container_isolated-6] [INFO] [1712502784.430920589] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502785.558296007] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.1866 Hz
[component_container_isolated-6] [INFO] [1712502785.580922313] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502786.719285330] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.1501 Hz
[component_container_isolated-6] [INFO] [1712502786.780879788] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502787.890919749] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.0530 Hz
[component_container_isolated-6] [INFO] [1712502787.930884112] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502789.057849226] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.2166 Hz
[component_container_isolated-6] [INFO] [1712502789.080970036] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502790.220343244] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.0901 Hz
[component_container_isolated-6] [INFO] [1712502790.280872493] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502791.410952318] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 6.1771 Hz
[component_container_isolated-6] [INFO] [1712502791.430894820] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502792.589177545] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 6.6651 Hz
[component_container_isolated-6] [INFO] [1712502792.630973065] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502793.757691487] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.2100 Hz
[component_container_isolated-6] [INFO] [1712502793.780912986] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502794.929971355] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 6.6340 Hz
[component_container_isolated-6] [INFO] [1712502794.980883824] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502796.100262904] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.0829 Hz
[component_container_isolated-6] [INFO] [1712502796.130893250] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [INFO] [1712502796.434693464] [controller_server]: Reached the goal!
[component_container_isolated-6] [INFO] [1712502796.468727916] [bt_navigator]: Goal succeeded No debug info:heatmap:log:[component_container_isolated-6] [WARN] [1712503095.496224853] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 6.7427 Hz
[component_container_isolated-6] [INFO] [1712503095.528353103] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503096.653798053] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.3624 Hz
[component_container_isolated-6] [INFO] [1712503096.678381167] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503097.811725154] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.4561 Hz
[component_container_isolated-6] [INFO] [1712503097.828368231] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503098.982560715] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 6.9256 Hz
[component_container_isolated-6] [INFO] [1712503099.028365828] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503100.145601639] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.2490 Hz
[component_container_isolated-6] [INFO] [1712503100.178347592] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503101.300538826] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.5454 Hz
[component_container_isolated-6] [INFO] [1712503101.328350956] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503102.489682982] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 6.1987 Hz
[component_container_isolated-6] [INFO] [1712503102.528344975] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503103.620119935] [BehaviorTreeEngine]: Behavior Tree tick rate 100.00 was exceeded!
[component_container_isolated-6] [WARN] [1712503103.750116318] [BehaviorTreeEngine]: Behavior Tree tick rate 100.00 was exceeded!
[component_container_isolated-6] [WARN] [1712503103.781381155] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 3.7982 Hz
[component_container_isolated-6] [INFO] [1712503103.828415911] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503104.943285845] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.3995 Hz
[component_container_isolated-6] [INFO] [1712503104.978332910] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503106.099112790] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.6074 Hz
[component_container_isolated-6] [INFO] [1712503106.128336811] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503107.261239182] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.5013 Hz
[component_container_isolated-6] [INFO] [1712503107.278327611] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503108.417016526] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.7461 Hz
[component_container_isolated-6] [INFO] [1712503108.428321611] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503109.574774285] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 6.7995 Hz
[component_container_isolated-6] [INFO] [1712503109.628329590] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [INFO] [1712503110.432371063] [controller_server]: Reached the goal!
[component_container_isolated-6] [INFO] [1712503110.467337745] [bt_navigator]: Goal succeeded fill and memset:heatmap:log:[component_container_isolated-6] [WARN] [1712501965.803225529] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 14.2463 Hz
[component_container_isolated-6] [INFO] [1712501965.853893996] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501966.906186567] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 13.6980 Hz
[component_container_isolated-6] [INFO] [1712501966.953889824] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501968.002165682] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 14.5333 Hz
[component_container_isolated-6] [INFO] [1712501968.053892152] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501969.113792948] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 11.0388 Hz
[component_container_isolated-6] [INFO] [1712501969.153938581] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501970.220819999] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 12.9332 Hz
[component_container_isolated-6] [INFO] [1712501970.253929709] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501971.326814685] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 11.9537 Hz
[component_container_isolated-6] [INFO] [1712501971.353821174] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501972.436967346] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 11.9931 Hz
[component_container_isolated-6] [INFO] [1712501972.453771302] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501973.536102459] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 13.6637 Hz
[component_container_isolated-6] [INFO] [1712501973.553775725] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501974.630920948] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 14.7525 Hz
[component_container_isolated-6] [INFO] [1712501974.653801734] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501975.723641930] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 14.2033 Hz
[component_container_isolated-6] [INFO] [1712501975.753767242] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501976.827910055] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 13.3183 Hz
[component_container_isolated-6] [INFO] [1712501976.853767451] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501977.931593677] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 12.7291 Hz
[component_container_isolated-6] [INFO] [1712501977.953772660] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501979.033853595] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 12.3315 Hz
[component_container_isolated-6] [INFO] [1712501979.053891269] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712501980.144254742] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 12.3276 Hz
[component_container_isolated-6] [INFO] [1712501980.203763265] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [INFO] [1712501980.808716824] [controller_server]: Reached the goal!
[component_container_isolated-6] [INFO] [1712501980.842564951] [bt_navigator]: Goal succeeded memory allocateheatmap:log:[component_container_isolated-6] [WARN] [1712502371.066840199] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 9.0723 Hz
[component_container_isolated-6] [INFO] [1712502371.118538636] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502372.214845043] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 8.4747 Hz
[component_container_isolated-6] [INFO] [1712502372.268566786] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502373.352589861] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 8.6201 Hz
[component_container_isolated-6] [INFO] [1712502373.368596103] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502374.488446346] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 8.9457 Hz
[component_container_isolated-6] [INFO] [1712502374.518525352] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502375.640796805] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 8.0873 Hz
[component_container_isolated-6] [INFO] [1712502375.668563003] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502376.780773821] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 8.7740 Hz
[component_container_isolated-6] [INFO] [1712502376.818563354] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502377.920977437] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 8.7421 Hz
[component_container_isolated-6] [INFO] [1712502377.968582205] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502379.063719262] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 8.5804 Hz
[component_container_isolated-6] [INFO] [1712502379.118528055] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502380.195911950] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 9.1943 Hz
[component_container_isolated-6] [INFO] [1712502380.218531430] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502381.330464447] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 8.7938 Hz
[component_container_isolated-6] [INFO] [1712502381.368553181] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502382.483840904] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 7.8642 Hz
[component_container_isolated-6] [INFO] [1712502382.518545248] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502383.628779657] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 8.1878 Hz
[component_container_isolated-6] [INFO] [1712502383.668550022] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502384.766645580] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 9.0869 Hz
[component_container_isolated-6] [INFO] [1712502384.818557396] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712502385.901603292] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 9.5215 Hz
[component_container_isolated-6] [INFO] [1712502385.918555762] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [INFO] [1712502386.022658595] [controller_server]: Reached the goal!
[component_container_isolated-6] [INFO] [1712502386.056236734] [bt_navigator]: Goal succeeded allheatmap:log:[component_container_isolated-6] [WARN] [1712503481.359536347] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 16.8673 Hz
[component_container_isolated-6] [INFO] [1712503481.370288027] [controller_server]: Received a goal, begin computing control effort.
[component_container_isolated-6] [WARN] [1712503482.433571514] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 18.7792 Hz
[component_container_isolated-6] [INFO] [1712503482.470714293] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503483.522442792] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 16.0881 Hz
[component_container_isolated-6] [INFO] [1712503483.570695555] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503484.600309788] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 16.7615 Hz
[component_container_isolated-6] [INFO] [1712503484.620720841] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503485.694226905] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 15.7225 Hz
[component_container_isolated-6] [INFO] [1712503485.720713503] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503486.773826208] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 18.7537 Hz
[component_container_isolated-6] [INFO] [1712503486.820702908] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503487.856192817] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 18.0292 Hz
[component_container_isolated-6] [INFO] [1712503487.870731079] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503488.942155541] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 16.2096 Hz
[component_container_isolated-6] [INFO] [1712503488.970765263] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503490.024566550] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 18.6103 Hz
[component_container_isolated-6] [INFO] [1712503490.070692747] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [INFO] [1712503491.120706218] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503492.177805319] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 17.4791 Hz
[component_container_isolated-6] [INFO] [1712503492.220716102] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503493.272749782] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 13.9141 Hz
[component_container_isolated-6] [INFO] [1712503493.320714886] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [INFO] [1712503494.370724457] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503495.423707508] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 18.8114 Hz
[component_container_isolated-6] [INFO] [1712503495.470684606] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503496.502086950] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 19.2704 Hz
[component_container_isolated-6] [INFO] [1712503496.520707989] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [INFO] [1712503497.620681976] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503498.657009331] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 17.6948 Hz
[component_container_isolated-6] [INFO] [1712503498.670698759] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [WARN] [1712503499.761913228] [planner_server]: Planner loop missed its desired rate of 20.0000 Hz. Current loop rate is 12.2771 Hz
[component_container_isolated-6] [INFO] [1712503499.820723750] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [INFO] [1712503500.870491599] [controller_server]: Passing new path to controller.
[component_container_isolated-6] [INFO] [1712503500.924946812] [controller_server]: Reached the goal!
[component_container_isolated-6] [INFO] [1712503500.959814084] [bt_navigator]: Goal succeeded |
Please provide with real hard metrics (time in ms) after release optimizations are applied - that is not sufficient to understand the practical difference to each change. |
ok |
According to my understanding, can I compare the test results one by one after applying each change with those without changes? |
Yes, you can also test using Also, please respond to one of my comments - I think you bypass a |
Thanks for your suggestion, I will do it soon. 0 Reset bypass issue I will reconsider and give results |
Maybe I need to redo the tests on the main branch, so I need some time to re-configurate my building environment. |
Ok! Its important if it accelerates things we have an appreciation for what/how much 🙂 |
May I ask a naive question? Which distro of ros2 should I choose if I want to build the code and run some tests on the main branch nicely? Or should I just use the docker img that is mentioned in the documents? |
Rolling is the distribution of choice for You are able to get Iron working as well, but involves a small handful of API changes |
@XinyuKhan what's the status here? |
Note from author: I currently found that navfn has the following problems:
|
Basic Info
Description of contribution in a few bullet points
before change:
after change
Description of documentation updates required from your changes
Future work that may be required in bullet points
For Maintainers: